package com.qc31.monitorlib.ui.adapter

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.qc31.comlib.entity.KeyValue
import com.qc31.monitorlib.R

/** @Author Jasper @Time 2020/9/28 @Desc todo */
class RefreshTimeAdapter :
    BaseQuickAdapter<KeyValue, BaseViewHolder>(R.layout.item_refresh_time) {
    var index = -1
    override fun convert(holder: BaseViewHolder, item: KeyValue) {
        holder.getView<ImageView>(R.id.ivChooseStart).isSelected = holder.layoutPosition == index
        holder.setText(R.id.tvChooseTitle, item.value)
    }
}